$(document).ready(function(){
	
		$.scrollUp({
		    scrollName: 'toTop', // Element ID
		    scrollDistance: 100, // Distance from top before showing element (px)
		    topSpeed: 100, // Speed back to top (ms)
		    animation: 'fade', // Fade, slide, none
		    animationInSpeed: 200, // Animation in speed (ms)
		    animationOutSpeed: 200, // Animation out speed (ms)
		    scrollText: '<img src="public/images/top.png" alt="Về đầu trang" />', // Text for element
		    activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
		  });
		
		/*
		$('#menu-search-box').select2({ 
    		width: 300,
    		minimumInputLength: 3,
    			ajax: { 
    			url: "index.php?module=user&act=ajax&feed_truyen2", 
    			dataType: 'json', 
    					data: function (term, page){ 
    						return {q: term }; 
    						}, 
    						results: function (data, page) {
								
    							return { results: data }; 
								
    						}
    			}
    	
    	}); 
		*/
		$('#chapt-chosen').select2({
			width: 300,
    		minimumInputLength: 3,
    		ajax: { 
    			url: "index.php?module=user&act=ajax&feed_truyen2", 
    			dataType: 'json', 
    					data: function (term, page){ 
    						return {q: term }; 
    						}, 
    						results: function (data, page) {
								
    							return { results: data }; 
								
    						}
    			}
		});
	
});

